package leetcode_401_500;

public class LeeCode_485 {
    public static void main(String[] args) {

    }
    private static int findMaxConsecutiveOnes(int[] nums) {
        int ans = 0;
        int count = 0;
        for (int num : nums) {
            if (num == 1){
                count++;
                ans = Math.max(count, ans);
            }else {
                count = 0;
            }
        }
        return ans;
    }
}
